<template>
    <div id="my-input">
        <input type="text" placeholder="请输入愿望" :value="value" @input="inputChange">
    </div>
</template>

<script>
export default {
    name: 'my-input',
    props:['value'],

    methods: {
        inputChange(e) {
            this.$emit('input', e.target.value)
        }
    }
 }
</script>

<style scoped>
#my-input{
    margin-top: 20px;
    margin-left: 10px;
}
#my-input input{
    width: 250px;
    height: 40px;
    padding-left: 10px;
}
</style>